package cn.lsc.exception;

import cn.lsc.enums.GlobaEnums;
import lombok.Data;

@Data//这个类是自定义异常的类
public class GlobaCustomException extends RuntimeException {
        private String errorMessager;
        private String errorCode;

        public GlobaCustomException(String message) {
                super(message);
        }

        /*
         * @Description: 自定义异常无参构造
         * @Author: Director
         * @Date: 2022/8/7 15:42
         * @return:
         **/
        public GlobaCustomException(){
                super();
        }
        public GlobaCustomException(String errorCode, String errorMessage){
                super(errorMessage);
                this.errorCode = errorCode;
                this.errorMessager= errorMessage;
        }
        public GlobaCustomException(GlobaEnums g){
                super(g.getErrorMessager());
                this.errorCode = g.getErrorCode();
                this.errorMessager= g.getErrorMessager();
        }


}
